﻿using System;
using System.ComponentModel.DataAnnotations;
namespace Home.Domain.Entities
{
    /*排序按照Sort*/
    /// <summary>
    /// 文章内容
    /// </summary>
    public class Article
    {
        public int Id { get; set; }
        /// <summary>
        /// 导航类别
        /// 1ASP.NET MVC
        /// 2Entity Framework
        /// 3HTML CSS
        /// 4.NET C#
        /// 5常用插件
        /// 6自己的类别
        /// </summary>
        public int Navbar { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [MaxLength(60)]
        public string Title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        [Required]
        public string Body { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Required]
        public int Sort { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 修改日期
        /// </summary>
        public DateTime EditDate { get; set; }
        /// <summary>
        /// 父类分类Id,空为未分类
        /// </summary>
        public int? PArticleId { get; set; }
        /// <summary>
        /// 分类
        /// </summary>
        public PArticle PArticle { get; set; }
    }
}
